<template>
  <div>
    <h3>Child</h3>
    <button @click="triggerChildError">触发错误</button>
  </div>
</template>

<script setup>
const triggerChildError = () => {
  // 在组件方法中手动抛出错误
  throw new Error("这是Child触发的错误");
};
</script>

<style lang="scss" scoped></style>
